<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

  <ui:composition template="/template.xhtml">
    <ui:define name="title">
      <h:outputText value="#{bundle.ViewUserTitle}"></h:outputText>
    </ui:define>
    <ui:define name="body">
      <h:panelGroup id="messagePanel" layout="block">
        <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
      </h:panelGroup>
      <h:form>
        <h:panelGrid columns="2">
          <h:outputText value="#{bundle.ViewUserLabel_name}"/>
          <h:outputText value="#{userController.selected.name}" title="#{bundle.ViewUserTitle_name}"/>
          <h:outputText value="#{bundle.ViewUserLabel_password}"/>
          <h:outputText value="#{userController.selected.password}" title="#{bundle.ViewUserTitle_password}"/>
          <h:outputText value="#{bundle.ViewUserLabel_userRole}"/>
          <h:outputText value="#{userController.selected.userRole}" title="#{bundle.ViewUserTitle_userRole}"/>
          <h:outputText value="#{bundle.ViewUserLabel_created}"/>
          <h:outputText value="#{userController.selected.created}" title="#{bundle.ViewUserTitle_created}">
            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
          </h:outputText>
          <h:outputText value="#{bundle.ViewUserLabel_id}"/>
          <h:outputText value="#{userController.selected.id}" title="#{bundle.ViewUserTitle_id}"/>
          <h:outputText value="#{bundle.ViewUserLabel_updated}"/>
          <h:outputText value="#{userController.selected.updated}" title="#{bundle.ViewUserTitle_updated}">
            <f:convertDateTime pattern="MM/dd/yyyy HH:mm:ss" />
          </h:outputText>
          <h:outputText value="#{bundle.ViewUserLabel_version}"/>
          <h:outputText value="#{userController.selected.version}" title="#{bundle.ViewUserTitle_version}"/>
        </h:panelGrid>
        <br />
        <h:commandLink action="#{userController.destroyAndView}" value="#{bundle.ViewUserDestroyLink}"/>
        <br />
        <br />
        <h:commandLink action="Edit" value="#{bundle.ViewUserEditLink}"/>
        <br />
        <h:commandLink action="#{userController.prepareCreate}" value="#{bundle.ViewUserCreateLink}" />
        <br />
        <h:commandLink action="#{userController.prepareList}" value="#{bundle.ViewUserShowAllLink}"/>
        <br />
        <br />
        <h:commandLink value="#{bundle.ViewUserIndexLink}" action="/index" immediate="true" />

      </h:form>
    </ui:define>
  </ui:composition>

</html>
